<?php
	$m 		= date('m');
	$month	= '';
	if($m == 1){
		$month = 'Jan';
	}elseif($m == 2){
		$month = 'Feb';
	}elseif($m == 3){
		$month = 'Mar';
	}elseif($m == 4){
		$month = 'Apr';
	}elseif($m == 5){
		$month = 'Mei';
	}elseif($m == 6){
		$month = 'Jun';
	}elseif($m == 7){
		$month = 'Jul';
	}elseif($m == 8){
		$month = 'Agu';
	}elseif($m == 9){
		$month = 'Sep';
	}elseif($m == 10){
		$month = 'Okt';
	}elseif($m == 11){
		$month = 'Nop';
	}elseif($m == 12){
		$month = 'Des';
	}
?>
<script type="text/javascript" src="<?php echo base_url(); ?>/js/watermark/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>/js/watermark/jquery-ui-1.8.6.custom.min.js"></script>
<!--<script type="text/javascript" src="<?php echo base_url(); ?>/js/watermark/jquery-watermarker-0.3.js"></script>-->
<link href="<?php echo base_url(); ?>/css/ui/jquery-ui-1.10.4.custom.min.css" rel="stylesheet">
<title>Cetak Legalisir Ijazah</title>
<style type="text/css">
	.watermark
	{
		
		width:150;
		height:150px;
	}
	
	#watermarked{
		width: 22cm;
        height: 35cm;
	}
	
	img.watermark:hover{
		cursor:move;
	}
	
	body {
        margin: 0;
        padding: 0;
        font: 12pt "Tahoma";
    }
    * {
        box-sizing: border-box;
        -moz-box-sizing: border-box;
    }
    .page {
        width: 8.27in;
        min-height: 12.99in;
        margin: 0px auto;
    }
    .subpage {
        height: 237mm;
    }
    
    @page {
        size: 8.27in 12.99in;
        margin: 0;
    }
    @media print {
        .page {
            margin: 0;
            border: initial;
            border-radius: initial;
            width: initial;
            min-height: initial;
            box-shadow: initial;
            background: none;
            page-break-after: always;
        }
		.watermark{
			border:none;
		}
		.no-print{
			display:none;
		}
    }
	.no-print{
		text-align:center;
		margin-top:10px;
		margin-bottom:10px;
	}
	#test{
		font-size:10pt;
		line-height:10px;
		color:#563f85;
	}
	#test:hover{
		cursor:move;
	}
	#test2{
		font-size:10pt;
		line-height:10px;
		color:#563f85;
	}
	#test2:hover{
		cursor:move;
	}
	input,
	button,
	select,
	textarea {
	  font-family: inherit;
	  font-size: inherit;
	  line-height: inherit;
	}
	.btn {
	  display: inline-block;
	  padding: 6px 12px;
	  margin-bottom: 0;
	  font-size: 14px;
	  font-weight: normal;
	  line-height: 1.42857143;
	  text-align: center;
	  white-space: nowrap;
	  vertical-align: middle;
	  cursor: pointer;
	  -webkit-user-select: none;
		 -moz-user-select: none;
		  -ms-user-select: none;
			  user-select: none;
	  background-image: none;
	  border: 1px solid transparent;
	  border-radius: 4px;
	}
	.btn:focus,
	.btn:active:focus,
	.btn.active:focus {
	  outline: thin dotted;
	  outline: 5px auto -webkit-focus-ring-color;
	  outline-offset: -2px;
	}
	.btn:hover,
	.btn:focus {
	  color: #333;
	  text-decoration: none;
	}
	.btn:active,
	.btn.active {
	  background-image: none;
	  outline: 0;
	  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
			  box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
	}
	.btn-success {
	  color: #fff;
	  background-color: #5cb85c;
	  border-color: #4cae4c;
	}
	.btn-success:hover,
	.btn-success:focus,
	.btn-success:active,
	.btn-success.active,
	.open .dropdown-toggle.btn-success {
	  color: #fff;
	  background-color: #47a447;
	  border-color: #398439;
	}
</style>
<script type="text/javascript">
	$(document).ready(function(){
		/* $('#watermarked').Watermarker({
			watermark_img	: '<?php echo base_url(); ?>496026dc/ea724608.png',
			opacity			: 1,
			id				: 'image1',
			// opacitySlider:      $('#sliderdiv'),
			position		: 'centerright',
			// onChange:           showCoords
		}); */
		/* $('#watermarked').Watermarker({
			watermark_img	: '<?php echo base_url(); ?>images/ttd_Agus.png',
			opacity			: 1,
			id				: 'image2',
			// opacitySlider:      $('#sliderdiv'),
			position		: 'centerleft',
			// onChange:           showCoords
		}); */
		<?php
		if($row["VERIFIKATOR"] == 1){
		?>
		$(".subpage").append("<table id=\"test\" style=\"text-align:center;font-weight:bold;margin-top:-1100px;\"><tr><td>Mengesahkan</td></tr><tr><td>Salinan / Foto Copy Ijazah</td></tr><tr><td>Sesuai Dengan Aslinya</td></tr><tr><td>No. Reg. 426.6/<?php echo $row["NOREG"]; ?>/436.6.4/<?php echo date("Y"); ?></td></tr><tr><td>Tanggal :<u> <?php echo date("d")." ".$month." ".date("Y"); ?></u></td></tr><tr><td>MENGETAHUI</td></tr><tr><td>an. Kepala Dinas Pendidikan</td></tr><tr><td>SEKRETARIS</td></tr><tr><td><img src=\"<?php echo base_url(); ?>admin/adlegalisir/get_ttd?url=ea724608.png\" width=120 height=90></td></tr><tr><td><u>Drs. Aston Tambunan, MSI</u></td></tr><tr><td>Pembina Tingkat I</td></tr><tr><td>NIP 19611227 199003 1 006</td></tr></table>");
		$("#test").draggable();
		<?php
		}
		?>
		<?php
		if($row["VERIFIKATOR"] == 2){
		?>
		$(".subpage").append("<table id=\"test2\" style=\"text-align:center;font-weight:bold;margin-top:-1100px;\"><tr><td>Mengesahkan</td></tr><tr><td>Salinan / Foto Copy Ijazah</td></tr><tr><td>Sesuai Dengan Aslinya</td></tr><tr><td>No. Reg. 426.6/<?php echo $row["NOREG"]; ?>/436.6.4/<?php echo date("Y"); ?></td></tr><tr><td>Tanggal :<u> <?php echo date("d")." ".$month." ".date("Y"); ?></u></td></tr><tr><td>MENGETAHUI</td></tr><tr><td>Kepala Dinas Pendidikan</td></tr><tr><td>Kota Surabaya</td></tr><tr><td><img src=\"<?php echo base_url(); ?>admin/adlegalisir/get_ttd?url=806427ae.png\" width=120 height=90></td></tr><tr><td>Dr. IKHSAN, S.Psi,MM</td></tr><tr><td>Pembina Tk. I</td></tr><tr><td>Nip. 19690809 199501 1 002</td></tr><tr><td></td></tr></table>");
		$("#test2").draggable();
		<?php
		}
		?>
		
	});
	// function showCoords(c)
	// {
		// $('#x').val(c.x);
		// $('#y').val(c.y);
		// $('#w').val(c.w);
		// $('#h').val(c.h);
		// $('#a').val(c.opacity);
	// };
</script>
<div class="no-print">
	<button onclick="window.print()" class="btn btn-success">
		Cetak
	</button>
	<!--<button onclick="document.location='<?//php echo site_url("admin/adlegalisir/lihatPersetujuan/" . $id); ?>'" class="btn btn-success">-->
	<button onclick="window.close()" class="btn btn-success">
		Selesai
	</button>
</div>
<div class="book">
    <div class="page">
		<div class="subpage"><img src="<?php if($jenis == 1){echo base_url("admin/adlegalisir/image?path=" . $row["ALAMAT_TK1"]);}elseif($jenis == 2){echo base_url("admin/adlegalisir/image?path=" . $row["ALAMAT_TK2"]);}elseif($jenis == 3){echo base_url("admin/adlegalisir/image?path=" . $row["ALAMAT_TK3"]);};?>" id="watermarked" style="height:1250px"></div>
    </div>
</div>